import 'package:flutter/material.dart';
import 'package:im_module/info/UserInfoWidget.dart';
import 'package:im_module/search/SearchFriendWidget.dart';
import 'package:im_module/widget/ImHeadImageWidget.dart';
import 'package:tencent_im_sdk_plugin/models/v2_tim_friend_info.dart';

class FriendWdiget extends StatelessWidget {

  V2TimFriendInfo application;
  final QueryCallback ageCallBack;

  FriendWdiget(this.application,this.ageCallBack);

  @override
  Widget build(BuildContext context) {
    return ListTile(
      leading: ImHeadImageWidget("${application.userProfile?.faceUrl}"),
      title: Text("${application.userProfile?.nickName}"),
      onTap: () {
        Navigator.push(context, MaterialPageRoute(builder: (_) {
          return UserInfoWidget(application.userID,ageCallBack);
        }));
      },
    );
  }
}
